(()=>{var e={733:(e,t,n)=>{"use strict";function i(e){var t;t=e.idwServicesConf.idwDataAccountWebUrl,window.open(t,"_blank").focus()}n.r(t),n.d(t,{bootstrap:()=>Me});var o=n(890),r=n(62),s=n(65),a=n.n(s);function c(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class l{constructor(){c(this,"tcDataValue",null),c(this,"tcloadedOccurred",!1),c(this,"previousConsentState",null)}hasConsent(){try{if(o.qQ.overrideHasConsent)return!0;if(!window.__tcfapi&&o.qQ.softPrivacyRegulated)return!0;if(!this.tcDataValue)return a().warn("Not yet received TCData from TCF API addEventListener"),!1;if(!1===this.tcDataValue.gdprApplies)return!0;const e=!!this.tcDataValue?.vendor?.consents[1116];return a().debug(`Anonymised IAB vendor (ID 1116) consent: ${e}`),e}catch(e){return a().warn(e),!1}}onConsentChanged(e){window.__tcfapi?window.__tcfapi("addEventListener",2,((t,n)=>{if("cmpuishown"!==t.eventStatus||!this.tcDataValue)if(n){if(a().debug(`tcf event: ${t.eventStatus}`,t),this.tcDataValue=t,"tcloaded"===t.eventStatus){if(this.tcloadedOccurred)return;this.tcloadedOccurred=!0}const n=this.hasConsent();if(null!==this.previousConsentState&&this.previousConsentState===n)return void a().debug(`Consent state unchanged (${n}), skipping callback`);this.previousConsentState=n,e()}else a().warn("__tcfapi.addEventListener failed with error. tcData: ",t)})):o.qQ.overrideHasConsent||o.qQ.softPrivacyRegulated?(this.previousConsentState=this.hasConsent(),e()):a().warn("__tcfapi is not defined")}}class d extends l{displayCMP(){window.__tcfapi("displayConsentUi",2,(()=>{}))}}class u extends l{displayCMP(){if(window.__cmp)try{window.__cmp("showScreen")}catch(e){a().warn("Consentmanager API error:",e)}else a().warn("Consentmanager API(window.__cmp) is not available. Can not invoke showScreen")}}class g extends l{displayCMP(){window.__tcfapi("toggleConsentTool",2,(()=>{}))}}class h extends l{displayCMP(){if(window.__lxG__consent__&&window.__lxG__consent__.showConsent)try{window.__lxG__consent__.showConsent()}catch(e){a().warn("Clickio API error:",e)}else a().warn("Clickio API(window.__lxG__consent__) is not available. Can not invoke displayCMP")}}class p extends l{constructor(e){var t,n,i;super(),i=null,(n="privacyManagerId")in(t=this)?Object.defineProperty(t,n,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[n]=i,this.privacyManagerId=e}displayCMP(){const e=window._sp_?.gdpr?.loadPrivacyManagerModal||window._sp_?.loadPrivacyManagerModal;if(e)try{this.privacyManagerId?e(this.privacyManagerId):e()}catch(e){a().warn("Sourcepoint API error:",e)}else a().warn("Sourcepoint API error: loadPrivacyManagerModal() function is not defined")}}class f extends l{displayCMP(){if(window.__unicapi)try{window.__unicapi("openunic")}catch(e){a().warn("UniConsent API error:",e)}else a().warn("UniConsent API(window.__unicapi) is not available")}}class m extends l{displayCMP(){if(window.Cookiebot&&window.Cookiebot.show)try{window.Cookiebot.show()}catch(e){a().warn("Cookiebot API error:",e)}else a().warn("Cookiebot API(window.Cookiebot) is not available. Can not invoke displayCMP")}}var w=n(358);class v extends l{displayCMP(){a().warn(`attempt to call displayCMP. This should not happened when ${w.t.cmpProvider} attribute is not set`)}}function y(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class b extends l{constructor(e){super(),y(this,"cookieGroup",null),y(this,"useTcfApi",!0),y(this,"consentChangeIntervalId",void 0),this.cookieGroup=e?.trim(),this.useTcfApi=!this.cookieGroup}displayCMP(){if(window._iub&&window._iub.cs&&window._iub.cs.api&&window._iub.cs.api.openPreferences)try{window._iub.cs.api.openPreferences()}catch(e){a().warn("Iubenda API error:",e)}else a().warn("Iubenda API(window._iub.cs.api.openPreferences()) is not available. Can not invoke function")}hasConsent(){return this.useTcfApi?super.hasConsent():window._iub?.cs?.consent?.purposes[this.cookieGroup]}onConsentChanged(e){if(this.useTcfApi)super.onConsentChanged(e);else{let t=this.hasConsent();window._iub?(this.consentChangeIntervalId&&clearInterval(this.consentChangeIntervalId),this.consentChangeIntervalId=setInterval((()=>{const n=this.hasConsent();t!==n&&(t=n,e())}),4e3)):a().warn("Iubenda API(window._iub) is not available"),e()}}}function C(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class I extends l{constructor(e){super(),C(this,"cookieGroup",null),C(this,"useTcfApi",!0),this.cookieGroup=e?.trim(),this.useTcfApi=!this.cookieGroup}displayCMP(){if(window.OneTrust&&window.OneTrust.ToggleInfoDisplay)try{window.OneTrust.ToggleInfoDisplay()}catch(e){a().warn("OneTrust API error:",e)}else a().warn("OneTrust API(window.OneTrust.ToggleInfoDisplay) is not available. Can not invoke ToggleInfoDisplay")}hasConsent(){return this.useTcfApi?super.hasConsent():window.OptanonActiveGroups&&window.OptanonActiveGroups.toLocaleLowerCase().includes(this.cookieGroup.toLocaleLowerCase())}onConsentChanged(e){this.useTcfApi?super.onConsentChanged(e):(window.OneTrust&&window.OneTrust.OnConsentChanged?window.OneTrust.OnConsentChanged((function(){e()})):a().warn("OneTrust API(window.OneTrust.OnConsentChanged) is not available. Can not invoke OnConsentChanged"),e())}}class S extends l{displayCMP(){if(window.googlefc&&window.googlefc.showRevocationMessage)try{window.googlefc.showRevocationMessage()}catch(e){a().warn("Google Funding Choices API error:",e)}else a().warn("Google Funding Choices API is not available. Can not invoke googlefc.showRevocationMessage()")}}class P extends l{displayCMP(){if(window.admiral)try{window.admiral("show","cmp.settings")}catch(e){a().warn("Admiral API error:",e)}else a().warn('Admiral API(window.admiral("show", "cmp.settings")) is not available. Can not invoke displayCMP')}}function T(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class _ extends l{constructor(e){super(),T(this,"cookieGroup",null),T(this,"useTcfApi",!0),this.cookieGroup=e?.trim(),this.useTcfApi=!this.cookieGroup}displayCMP(){if(window.Bootstrapper&&window.Bootstrapper.gateway&&window.Bootstrapper.gateway.openBanner)try{window.Bootstrapper.gateway.openBanner()}catch(e){a().warn("Ensighten API error:",e)}else a().warn("Ensighten API(window.Bootstrapper.gateway.openBanner()) is not available. Can not invoke function")}checkConsent(){if(window?.Bootstrapper?.gateway?.getUserPreference("Advertisement")>0)return!0;if(!window?.Bootstrapper?.gateway?.getList)return a().warn("Ensighten API(window.Bootstrapper.gateway.getList()) is not available. Can not invoke function"),!1;try{const e=window.Bootstrapper.gateway.getList();return e.CUSTOM_ALLOW&&e.CUSTOM_ALLOW.some((e=>e.tag.includes("https://account.anonymised.io/login")))||e.CUSTOM_BLOCK&&!e.CUSTOM_BLOCK.some((e=>e.tag.includes("https://account.anonymised.io/login")))}catch(e){return a().warn("Ensighten API error:",e),!1}}hasConsent(){return this.useTcfApi?super.hasConsent():this.checkConsent()}onConsentChanged(e){if(this.useTcfApi)super.onConsentChanged(e);else{let t=this.hasConsent();window.Bootstrapper?setInterval((()=>{const n=this.hasConsent();t!==n&&(t=n,e())}),1e3):a().warn("Ensighten API(window.Bootstrapper) is not available"),e()}}}function k(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class A extends l{constructor(e){super(),k(this,"cookieGroup",null),k(this,"useTcfApi",!0),this.cookieGroup=e?.trim(),this.useTcfApi=!this.cookieGroup}displayCMP(){if(window.CookieScript?.instance?.show)try{window.CookieScript.instance.show()}catch(e){a().warn("CookieScript API error:",e)}else a().warn("CookieScript API(window.CookieScript) is not available. Can not invoke displayCMP")}hasConsent(){if(this.useTcfApi)return super.hasConsent();{const e=window.CookieScript?.instance?.currentState();return"accept"===e?.action&&e.categories?.includes(this.cookieGroup.toLocaleLowerCase())}}onConsentChanged(e){if(this.useTcfApi)super.onConsentChanged(e);else{let t=null;const n=()=>{null!==t&&clearTimeout(t),t=window.setTimeout((()=>{e(),t=null}),100)};window.addEventListener("CookieScriptAcceptAll",n),window.addEventListener("CookieScriptAccept",n),window.addEventListener("CookieScriptReject",n),e()}}}function L(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class E extends l{constructor(e){super(),L(this,"cookieGroup",null),L(this,"useTcfApi",!0),this.cookieGroup=e?.trim(),this.useTcfApi=!this.cookieGroup}displayCMP(){if(window.klaro?.show)try{window.klaro.show()}catch(e){a().warn("Klaro API error:",e)}else a().warn("Klaro API(window.klaro) is not available. Can not invoke displayCMP")}hasConsent(){return this.useTcfApi?super.hasConsent():window.klaro?.getManager().getConsent(this.cookieGroup.toLocaleLowerCase())}onConsentChanged(e){if(this.useTcfApi)super.onConsentChanged(e);else{const t={update:function(t,n){"saveConsents"===n&&e()}};window.klaro.getManager().watch(t),e()}}}function x(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class O extends l{constructor(e){super(),x(this,"cookieGroup",null),x(this,"useTcfApi",!0),x(this,"consentChangeIntervalId",void 0),this.cookieGroup=e?.trim(),this.useTcfApi=!this.cookieGroup}displayCMP(){if(window.CookieControl?.open)try{window.CookieControl.open()}catch(e){a().warn(`Civic API error: ${e}`)}else a().warn("Civic API(window.CookieControl.open()) is not available. Can not invoke displayCMP")}hasConsent(){if(this.useTcfApi)return super.hasConsent();{const e=window.CookieControl?.getCookie("CookieControl");if(!e)return!1;try{const t=JSON.parse(e);return"accepted"===(t.optionalCookies||[])[this.cookieGroup.toLocaleLowerCase()]}catch(e){return a().warn(`Civic API CookieControl parsing error: ${e}`),!1}}}onConsentChanged(e){if(this.useTcfApi)super.onConsentChanged(e);else{let t=this.hasConsent();window.CookieControl?(this.consentChangeIntervalId&&clearInterval(this.consentChangeIntervalId),this.consentChangeIntervalId=setInterval((()=>{const n=this.hasConsent();t!==n&&(t=n,e())}),4e3)):a().warn("Civic API(window.CookieControl) is not available"),e()}}}function $(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class U extends l{constructor(e){super(),$(this,"cookieGroup",null),$(this,"useTcfApi",!0),$(this,"consentListener",null),this.cookieGroup=e?.trim(),this.useTcfApi=!this.cookieGroup}displayCMP(){if("function"==typeof window.revisitCkyConsent)try{window.revisitCkyConsent()}catch(e){a().warn(`CookieYes API error: ${e}`)}else a().warn("CookieYes API(window.revisitCkyConsent) is not available. Can not invoke displayCMP")}hasConsent(){if(this.useTcfApi)return super.hasConsent();if("function"!=typeof window.getCkyConsent)return a().warn("CookieYes API(window.getCkyConsent) is not available"),!1;try{const e=window.getCkyConsent();if(!e||!e.categories)return!1;const t=this.cookieGroup.toLowerCase();return!0===e.categories[t]}catch(e){return a().warn(`CookieYes consent retrieval error: ${e}`),!1}}onConsentChanged(e){if(this.useTcfApi)super.onConsentChanged(e);else{let t=this.hasConsent();this.consentListener&&document.removeEventListener("cookieyes_consent_update",this.consentListener),this.consentListener=()=>{const n=this.hasConsent();t!==n&&(t=n,e())},document.addEventListener("cookieyes_consent_update",this.consentListener),e()}}}let M=null;const[R,B]=o.qQ.cmpProvider?o.qQ.cmpProvider.split(":"):["undefined",null],j=B?.trim()||null,N=o.qQ.cmpProviderCookieGroup;switch(a().debug(`cmpProvider: ${R}, privacyManagerId: ${j}, cmpProviderCookieGroup: ${N}`),R.toLowerCase()){case r.P.Quantcast:a().debug("using QuantcastApi"),M=new d;break;case r.P.Consentmanager:a().debug("using ConsentmanagerApi"),M=new u;break;case r.P.Liveramp:a().debug("using LiverampApi"),M=new g;break;case r.P.Clickio:a().debug("using ClickioApi"),M=new h;break;case r.P.Sourcepoint:a().debug("using SourcepointApi"),M=new p(j);break;case r.P.Iubenda:a().debug("using Iubenda"),M=new b(N);break;case r.P.Uniconsent:a().debug("using UniConsentApi"),M=new f;break;case r.P.OneTrust:case r.P.CookiePro:a().debug("using OneTrustApi"),M=new I(N);break;case r.P.CookieBot:a().debug("using Cookiebot"),M=new m;break;case r.P.Googlefc:a().debug("using GooglefcApi"),M=new S;break;case r.P.Admiral:a().debug("using AdmiralApi"),M=new P;break;case r.P.Ensighten:a().debug("using EnsightenApi"),M=new _;break;case r.P.CookieScript:a().debug("using CookieScriptApi"),M=new A(N);break;case r.P.Klaro:a().debug("using KlaroApi"),M=new E(N);break;case r.P.Civic:a().debug("using CivicApi"),M=new O(N);break;case r.P.Cookieyes:a().debug("using CookieyesApi"),M=new U(N);break;default:a().warn(`Unset or used incorrect value of the ${w.t.cmpProvider}:'${o.qQ.cmpProvider}'. \n The default TCFv2 API will be used`),M=new v}class H{constructor(e){var t,n,i;i=void 0,(n="pluginConfig")in(t=this)?Object.defineProperty(t,n,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[n]=i,this.pluginConfig=e}configureUI(){this.injectCustomCSSOverrides(),this.addPluginToDOM(),this.addPluginButtonToDOM()}addPluginButtonToDOM(){if(this.pluginConfig.hideButton)return;const e=document.createDocumentFragment(),t=document.createElement("div");t.innerHTML=``,e.appendChild(t.firstChild),document.body.appendChild(document.adoptNode(e)),document.getElementById("idw-open-trigger").addEventListener("click",this.handlePluginButtonClick.bind(this),!1)}addPluginToDOM(){if(this.pluginConfig.hideButton)return;const e=document.createDocumentFragment(),t=document.createElement("div");t.innerHTML="
\n
\n
\n
",e.appendChild(t.firstChild),document.body.appendChild(e)}handlePluginButtonClick(){this.pluginConfig.notIntegrateCmp||M instanceof v||this.pluginConfig.softPrivacyRegulated&&!window.__tcfapi?i(this.pluginConfig):this.togglePlugin()}togglePlugin(){!document.getElementById("idw-plugin-container").classList.contains("idw-open")?this.openPlugin():"hidden"!==document.body.style.overflow&&this.closePlugin()}closeOnClickOutside(){document.addEventListener("click",function(e){const t=document.getElementById("idw-open-trigger"),n=t?.contains(e.target);n||this.closePlugin()}.bind(this))}closePlugin(){document.getElementById("idw-plugin-container").classList.remove("idw-open")}openPlugin(){document.getElementById("idw-plugin-container").classList.add("idw-open")}shouldHidePluginButton(e){const t=document.getElementById("idw-open-trigger");t&&t.style&&(t.style.display=e?"none":"block")}navigateToScreenLoggedInMain(){if(this.pluginConfig.hideButton)return;document.getElementById("idw-plugin-buttons").innerHTML="\n ",document.getElementById("idw-cookies-setting").addEventListener("click",(()=>{M.displayCMP(),this.closePlugin()})),document.getElementById("idw-manage-consent").addEventListener("click",(()=>{i(this.pluginConfig),this.closePlugin()})),this.closeOnClickOutside()}addStyle(e){const t=document.createElement("style");t.textContent=e,document.head.appendChild(t)}injectCustomCSSOverrides(){this.addStyle(`\n #idw-plugin-container .pluginBtn {\n color: ${this.pluginConfig.colorPrimary} !important;\n }\n\n #idw-plugin-container .pluginBtn:hover {\n background-color: ${this.pluginConfig.colorPrimary} !important;\n }\n \n #idw-open-trigger {\n background-color: ${this.pluginConfig.colorPrimary};\n }\n `)}}function G(e,t={}){return function(e){const t=e.split("?")[0];return Array.from(document.scripts).some((e=>e.src.split("?")[0]===t))}(e)?Promise.resolve():new Promise((n=>{const i=document.createElement("script");i.type="text/javascript",i.async=!0,i.addEventListener("load",(()=>{n()})),i.src=e,Object.keys(t).forEach((e=>{i.setAttribute(e,t[e])})),document.getElementsByTagName("head")[0].appendChild(i)}))}var D=n(319);const F={load:async function(e){if(e.retargetingOn&&await G(`${e.idwServicesConf.idwRetargetingScript}?v=${D.A}`,{[w.t.retargetingSegmentsUrl]:e.idwServicesConf.idwRetargetingSegmentsUrl,"metrics-url":`${e.idwServicesConf.idwMetricsRootUrl}/v3/collect/tag`,"tag-type":e.tagType}),e.conversionOn){const t={[w.t.clientId]:e.clientId};"DEV"===e.type&&(t[w.t.environment]="dev"),await G(`${e.idwServicesConf.conversionScript}?v=${D.A}`,{...t})}},unLoad:function(e){!function(e){const t=e.split("?")[0],n=Array.from(document.scripts).find((e=>e.src.split("?")[0]===t));n?.parentNode&&n.parentNode.removeChild(n)}(`${e.idwServicesConf.idwRetargetingScript}?v=${D.A}`)}};var V=n(274);var q=n(368),z=n(138);const Q="idw-impression-counter";const K=new class{constructor(e){var t,n,i;i=void 0,(n="loginManager")in(t=this)?Object.defineProperty(t,n,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[n]=i,this.loginManager=e}async sendData(e,t){try{e.cohort_ids=localStorage.getItem(q.H.IdwCohortIdsKey)?JSON.parse(localStorage.getItem(q.H.IdwCohortIdsKey)):null,e.cohort_ids||(e.temp_data=Object.keys(localStorage))}catch(t){e.temp_data="error during cohort_ids reading from local storage"}const n=t?`${o.qQ.idwServicesConf.idwMetricsRootUrl}/v3/collect/impression`:`${o.qQ.idwServicesConf.idwMetricsRootUrl}/v3/anon/collect/impression`,i={method:"POST",headers:t?{"Content-Type":"application/json",Authorization:"Bearer "+t}:{"Content-Type":"application/json"},body:JSON.stringify(e)};a().debug("Sending impression to server",e);try{return(await(0,V.n)(n,i)).ok}catch(e){a().warn("Sending impression failed ",e)}}hasAnyKey(e){return!!e&&Object.keys(e).length>0}async cacheAndSendData(e){const t=await this.loginManager.getUser(),n=JSON.parse(localStorage.getItem(Q))??[];if(!!sessionStorage.getItem(q.H.isOofUrl)||n.push(e),sessionStorage.removeItem(q.H.isOofUrl),t){let e=0;for(;e{const t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)}))}function J(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const Y=new class{constructor(){J(this,"pageViewId",void 0),J(this,"pageCount",void 0),J(this,"sessionIdValue",void 0),J(this,"totalPageCount",void 0),this.pageViewId=this.generatePageViewId(),this.sessionIdValue=this.getOrCreateSessionId(),this.pageCount=this.getOrInitializePageCount(),this.totalPageCount=this.incrementTotalPageCount(),this.updatePageViewId()}getCookie(e){const t=`; ${document.cookie}`.split(`; ${e}=`);if(2===t.length)return t.pop().split(";").shift()}setCookie(e,t,n){const i=new Date;i.setTime(i.getTime()+24*n*60*60*1e3);const o=`expires=${i.toUTCString()}`;document.cookie=`${e}=${t};${o};path=/`}getOrCreateFeId(){const e="idw-fe-id";let t=localStorage.getItem(e);return t||(t=this.getCookie(e),t?localStorage.setItem(e,t):(t=W(),localStorage.setItem(e,t),this.setCookie(e,t,365))),t}getOrCreateSessionId(){const e="idw-session-id";let t=sessionStorage.getItem(e);return t||(t=W(),sessionStorage.setItem(e,t)),t}getOrInitializePageCount(){const e="idw-page-count",t=sessionStorage.getItem(e),n=t?parseInt(t,10)+1:1;return sessionStorage.setItem(e,n.toString()),n}incrementTotalPageCount(){const e="idw-total-page-count",t=localStorage.getItem(e),n=t?parseInt(t,10)+1:1;return localStorage.setItem(e,n.toString()),n}generatePageViewId(){return W()}updatePageViewId(){this.pageViewId=this.generatePageViewId()}get id(){return this.pageViewId}get sessionId(){return this.sessionIdValue}get feId(){return this.getOrCreateFeId()}get count(){return this.pageCount}get totalCount(){return this.totalPageCount}},X="dataLayer",Z="anon-impression-tracker",ee="anonRetargetingSegmentAssigned";function te(e){window.addEventListener("message",(t=>async function(e,t){if(e.data?.from===Z){if(!(t&&await t()))return void a().debug("frequency capping is disabled due to lack of CMP consent");a().debug("impression-tracker message received",e.data,"from",e.origin),e.data?.src?async function(e){let t=null;try{t=new URL(e.src)}catch(e){return void a().warn("impression-tracker received campaign.js src is not a valid URL")}if(!t)return;const n={fe_id:Y.feId},i=t.searchParams,o=function(e){const t={};return["itId","campaignId","creativeId","publisherId","placementId","ePlacementId","clientId","anonId","dealId","advertiserId","publisherName"].forEach((n=>{const i=e.get(n);i&&(t[n]=i)})),t}(i);Object.assign(n,o);const r=i.get("t"),s=i.get("cb");(e.t||r)&&(n.t=e.t??r);n.href=window?.location?.href,s&&(n.cb=s);e.adId&&(n.ad_id=e.adId);n.temp_data=e.tm?e.tm:"empty",await K.cacheAndSendData(n)}({src:e.data.src,t:e.data.t,adId:e.data.id,tm:e.data.tm}):a().warn("impression-tracker message is missing required `src` value")}}(t,e)))}function ne(e,t){let n;n=e<=3?0:e>3&&e<=20?.1:e/200;const i=t/100;let o;o=i<.1?0:i>=.1&&i<.25?.05:i>=.25&&i<.5?.075:.1;const r=n+o;return Math.round(100*r)/100}const ie={maxScrollPosition:0,getMaxScroll:function(){return Math.round(this.maxScrollPosition)},updateMaxScroll:function(){const e=function(){const e=document.documentElement,t=document.body,n="scrollTop",i="scrollHeight";return(e[n]||t[n])/((e[i]||t[i])-e.clientHeight)*100||0}();e>this.maxScrollPosition&&(this.maxScrollPosition=e)},subscribeToScrollEvent:function(){window.addEventListener("scroll",(()=>{this.updateMaxScroll()}))}};function oe(){const e=Array.from(document.getElementsByTagName("script"));for(const t of e){const e=t.getAttribute("src");if(e&&e.includes("googletagmanager.com/gtm.js"))try{return new URLSearchParams(new URL(e).search).get("l")}catch(e){return null}}return null}function re(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}ie.subscribeToScrollEvent();const se=new class{constructor(){re(this,"observers",new Map),re(this,"dataLayerPushHandler",void 0),re(this,"lastNotifiedUrls",{oldUrl:"",newUrl:""}),re(this,"dataLayerName",void 0),this.dataLayerName=oe()||X,this.dataLayerPushHandler=this.handleDataLayerPush.bind(this),window[this.dataLayerName]?this.overrideDataLayerPush():window.addEventListener(this.dataLayerName,this.overrideDataLayerPush.bind(this))}overrideDataLayerPush(){const e=window[this.dataLayerName].push;window[this.dataLayerName].push=(...t)=>{e.apply(window[this.dataLayerName],t),this.dataLayerPushHandler(t)}}handleDataLayerPush(e){if(e[0]&&e[0].event?.includes("gtm.historyChange")){const t=e[0],n=t["gtm.oldUrl"],i=t["gtm.newUrl"];this.lastNotifiedUrls.oldUrl===n&&this.lastNotifiedUrls.newUrl===i||(this.lastNotifiedUrls={oldUrl:n,newUrl:i},this.notifyObservers(n,i))}}notifyObservers(e,t){const n=Array.from(this.observers.values());for(const i of n)i(e,t)}addEventListener(e){const t=Symbol();return this.observers.set(t,e),t}removeEventListener(e){this.observers.delete(e)}};function ae(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const ce=new class{constructor(e={}){ae(this,"startStopTimes",void 0),ae(this,"idleTimeoutMs",void 0),ae(this,"idleCheckIntervalMs",void 0),ae(this,"currentIdleTimeMs",void 0),ae(this,"isUserIdle",void 0),ae(this,"isTracking",void 0),ae(this,"idleCheckInterval",void 0),this.startStopTimes=[],this.idleTimeoutMs=e.idleTimeoutMs||3e4,this.idleCheckIntervalMs=250,this.currentIdleTimeMs=0,this.isUserIdle=!1,this.isTracking=!1,this.idleCheckInterval=null,this.handleUserActivity=this.handleUserActivity.bind(this),this.handleWindowBlur=this.handleWindowBlur.bind(this),this.handleWindowFocus=this.handleWindowFocus.bind(this),this.checkIdleState=this.checkIdleState.bind(this)}handleUserActivity(){this.startTimer()}handleWindowBlur(){this.stopTimer()}handleWindowFocus(){this.startTimer()}resetIdleTimer(){this.isUserIdle=!1,this.currentIdleTimeMs=0}checkIdleState(){this.isTracking&&(this.isUserIdle||(this.currentIdleTimeMs+=this.idleCheckIntervalMs,this.currentIdleTimeMs>=this.idleTimeoutMs&&(this.isUserIdle=!0,this.stopTimer())))}startTimer(){this.isTracking||(this.isTracking=!0,this.startStopTimes.push({startTime:new Date,stopTime:void 0})),this.resetIdleTimer()}stopTimer(){if(this.isTracking){const e=this.startStopTimes[this.startStopTimes.length-1];e&&!e.stopTime&&(e.stopTime=new Date),this.isTracking=!1}}initialize(){this.cleanup(),document.addEventListener("mousemove",this.handleUserActivity),document.addEventListener("keypress",this.handleUserActivity),document.addEventListener("scroll",this.handleUserActivity),document.addEventListener("click",this.handleUserActivity),window.addEventListener("blur",this.handleWindowBlur),window.addEventListener("focus",this.handleWindowFocus),this.idleCheckInterval=setInterval(this.checkIdleState,this.idleCheckIntervalMs),this.startTimer()}cleanup(){this.idleCheckInterval&&(clearInterval(this.idleCheckInterval),this.idleCheckInterval=null),document.removeEventListener("mousemove",this.handleUserActivity),document.removeEventListener("keypress",this.handleUserActivity),document.removeEventListener("scroll",this.handleUserActivity),document.removeEventListener("click",this.handleUserActivity),window.removeEventListener("blur",this.handleWindowBlur),window.removeEventListener("focus",this.handleWindowFocus)}reset(){this.cleanup(),this.startStopTimes=[],this.isTracking=!1,this.isUserIdle=!1,this.currentIdleTimeMs=0}getTotalTimeInMs(){return this.startStopTimes.reduce(((e,t)=>{const n=t.startTime;return e+((t.stopTime||(this.isTracking?new Date:t.startTime))-n)}),0)}getTotalTimeInSeconds(){return this.getTotalTimeInMs()/1e3}};const le="anonUserSignedIn";function de(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const ue="idw-intscores";class ge{constructor(e,t,n){de(this,"isPageScoreStored",!1),de(this,"pluginConfig",void 0),de(this,"observerId",void 0),de(this,"impressionCounter",void 0),de(this,"loginManager",void 0),de(this,"hasSentInterestScoresForPageview",!1),de(this,"lastSentScores",[]),de(this,"getPPS",(async(e={})=>{if(this.pluginConfig.ppsEnabled){const t=await async function(e,t={}){try{const n=await(0,V.n)(`${e.idwServicesConf.idwMetricsRootUrl}/v3/public/pps`,t);return n.ok?await n.json():(a().warn(`Failed to load IAB audience: ${n.status}`),[])}catch(e){return a().warn(`Failed to load IAB audience: ${e}`),[]}}(this.pluginConfig,e)??[];if(t.length){let e={};try{e=JSON.parse(localStorage.getItem(q.H.AnonSignalLift))||{}}catch(e){a().debug(`${q.H.AnonSignalLift} local storage object is not defined`)}e.iabAudience=t,localStorage.setItem(q.H.AnonSignalLift,JSON.stringify(e)),window._anonymised_tag=window._anonymised_tag||{},window._anonymised_tag.signalLift={...window._anonymised_tag.signalLift,...e},a().debug("Set PPS to LS")}}})),de(this,"userSignedInHandler",(()=>{this.sendAccumulatedInterestScores()})),this.pluginConfig=e,this.loginManager=t,this.impressionCounter=n,ce.initialize()}async start(){document.addEventListener("visibilitychange",this.visibilitychangeHandler.bind(this)),document.addEventListener(ee,this.anonRetargetingSegmentAssignedHandler.bind(this)),window.addEventListener(le,this.userSignedInHandler),this.impressionCounter?.start(),this.observerId=se.addEventListener(this.spaRouteChangeHandler.bind(this)),this.sendAccumulatedInterestScores(!this.hasSentInterestScoresForPageview)}stop(){document.removeEventListener("visibilitychange",this.visibilitychangeHandler.bind(this)),document.removeEventListener(ee,this.anonRetargetingSegmentAssignedHandler.bind(this)),window.removeEventListener(le,this.userSignedInHandler),this.impressionCounter?.stop(),se.removeEventListener(this.observerId)}spaRouteChangeHandler(e,t){a().debug(`SPA route changed from: ${e}, to: ${t}`),(e=>{if(!e)return!1;try{let t;return t=e.includes("?")||e.startsWith("/")?new URL(e,"http://dummy.base").searchParams:new URLSearchParams(e),t.has("callback")&&t.has("code")}catch{return!1}})(e)?a().debug("Skip route change handler for the redirect url"):(Y.updatePageViewId(),this.sendAccumulatedInterestScores(!0))}visibilitychangeHandler(){"hidden"!==document.visibilityState||this.isPageScoreStored||this.calculateAndStoreInterestScores()}anonRetargetingSegmentAssignedHandler(e){a().debug(`Send interest scores on anon retargeting segment assigned event: ${e.detail.tag}`),this.sendAccumulatedInterestScores(!0,!1)}calculateAndStoreInterestScores(e=!0){const t={value:ne(ce.getTotalTimeInSeconds(),ie.getMaxScroll()),url:encodeURIComponent(window.location.href)};if(!t.url.startsWith("http"))return void a().warn(`Interest score URL is not valid: ${t.url}. Skip sending interest-score metric.`);const n=localStorage.getItem(ue)?JSON.parse(localStorage.getItem(ue)):[];n.push(t);try{const t=this.aggregateByUrlKey(n);return e&&(localStorage.setItem(ue,JSON.stringify(t)),this.isPageScoreStored=!0),t}catch(e){a().warn(`Failed to aggregate interest scores: ${e}`)}}async sendAccumulatedInterestScores(e=!0,t=!0){const n=localStorage.getItem(ue)?JSON.parse(localStorage.getItem(ue)):this.lastSentScores.length>0?this.lastSentScores:this.calculateAndStoreInterestScores(!1);if(e&&n&&n.length>0){const e=await this.loginManager.getUser(),i=e&&!e.expired,o=i?`${this.pluginConfig.idwServicesConf.idwMetricsRootUrl}/v3/interest-scores`:`${this.pluginConfig.idwServicesConf.idwMetricsRootUrl}/v3/anon/interest-scores`,r={scores:n,bids:this.impressionCounter?.getFormattedImpressions()??[],fe_id:Y.feId,pageview_id:Y.id},s={method:"POST",headers:i?{"Content-Type":"application/json",Authorization:"Bearer "+e.access_token}:{"Content-Type":"application/json"},body:JSON.stringify(r)};try{const t=await(0,V.n)(o,s),i=t.ok?await t.json():[];i.push("default"),this.lastSentScores=n,this.hasSentInterestScoresForPageview=!0,e&&localStorage.removeItem(ue),this.impressionCounter?.clearImpressions();const r=new Set([...i]),a=Array.from(r);localStorage.setItem(q.H.IdwCohortIdsKey,JSON.stringify(a))}catch(e){a().warn(`Failed to send interest scores: ${e}`)}if(t)try{this.getPPS(s)}catch(e){a().warn(`Failed to sent PPS: ${e}`)}}}aggregateByUrlKey(e){const t=e.reduce(((e,t)=>{const{url:n,value:i}=t;return"number"==typeof i&&(e.hasOwnProperty(n)?e[n]+=i:e[n]=i),e}),{});return Object.keys(t).map((e=>({url:e,value:t[e]}))).slice(-15)}}function he(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class pe{constructor(e,t,n){he(this,"screenProvider",void 0),he(this,"pluginConfig",void 0),he(this,"loginManager",void 0),he(this,"loaded",void 0),he(this,"anonInterestScores",void 0),this.loaded=!1,this.pluginConfig=e,this.loginManager=t,this.screenProvider=new H(this.pluginConfig),this.anonInterestScores=new ge(this.pluginConfig,this.loginManager,n)}async build(){this.subscribeToCmpEvents(),"publisher"===this.pluginConfig.tagType&&(this.screenProvider.configureUI(),await this.buildUserSpecificUI(),te(M.hasConsent.bind(M)))}subscribeToCmpEvents(){M.onConsentChanged((async()=>{const e=await this.loginManager.getUser(),t=M.hasConsent();a().info(`CMP consent set to ${t}`),null===e&&t&&this.loginManager.queueLogin(),t||this.loaded||(!async function(){const e={method:"GET",headers:{"Content-Type":"application/json"}};try{await(0,V.n)(`${o.qQ.idwServicesConf.idwMetricsCollector}`,e)}catch(e){a().warn("metrics collector api ping error:",e)}}(),this.loaded=!0),this.handleCollectScripts(t)}))}async handleCollectScripts(e){e?(this.anonInterestScores.start(),F.load(this.pluginConfig)):(F.unLoad(this.pluginConfig),this.anonInterestScores.stop())}async buildUserSpecificUI(){null===await this.loginManager.getUser()?this.screenProvider.shouldHidePluginButton(!0):(this.screenProvider.navigateToScreenLoggedInMain(),this.screenProvider.shouldHidePluginButton(this.pluginConfig.hideButton))}}var fe=n(182);function me(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class we{constructor(e){me(this,"allImpressions",void 0),me(this,"isCounting",void 0),this.allImpressions=e,this.isCounting=!1,this.countGptImpressions()}countGptImpressions(){const e=window.googletag;e&&e.pubads&&e.pubads().addEventListener("slotRenderEnded",this.handleSlotRenderEnded.bind(this))}start(){this.isCounting=!0}stop(){this.isCounting=!1}handleSlotRenderEnded(e){if(!this.isCounting)return;const t=window.googletag;if(t&&t.pubads)try{if(!1===e.isEmpty){const n=e.slot.getSlotElementId(),i=this.determineMediaType(e),o=q.H.anonymised.toLowerCase(),r=[...e.slot.getTargetingKeys(),...t.pubads().getTargetingKeys()],s={mediaType:i,hasAnonymised:r.some((e=>e.toLowerCase().includes(o))),isWinningBid:!0,bidderCode:"google",compoundId:`${n}_${e.creativeId}`};this.allImpressions[s.compoundId]?a().debug("GAM Impression already counted:",s.compoundId):(this.allImpressions[s.compoundId]=s,delete s.compoundId,localStorage.setItem(q.H.IdwImpressionsKey,JSON.stringify(this.allImpressions)))}}catch(e){a().warn("Error in the slotRenderEnded event handler",e)}}determineMediaType(e){try{const t=e.slot.getSlotElementId();return t.includes("video")?"video":t.includes("native")?"native":t.includes("banner")?"banner":null===e.size?"native":Array.isArray(e.size)&&2===e.size.length&&1===e.size[0]&&1===e.size[1]?"video":"banner"}catch(e){return a().warn("Failed to determine media type:",e),"banner"}}}class ve{constructor(e,t){me(this,"prebidAuctions",void 0),me(this,"allImpressions",void 0),me(this,"sentImpressionKeys",void 0),me(this,"isCounting",void 0),this.prebidAuctions={},this.sentImpressionKeys=t??[],this.allImpressions=e,this.isCounting=!1,this.countPrebidImpressions()}start(){this.isCounting=!0}stop(){this.isCounting=!1}countPrebidImpressions(){try{const e=(window?._pbjsGlobals??["pbjs"])[0],t=window[e];if(!t||!t.que)return;t.que.push((()=>{const e=t.getEvents().filter((({eventType:e})=>"auctionEnd"===e));this.prebidAuctions=e.reduce(((e,{args:t})=>(e[t.auctionId]={auctionId:t.auctionId,bidderRequests:t.bidderRequests,bidsReceived:t.bidsReceived,timestamp:t.timestamp},e)),{}),t.onEvent("auctionEnd",(e=>{if(this.prebidAuctions[e.auctionId]={auctionId:e.auctionId,bidderRequests:e.bidderRequests,bidsReceived:e.bidsReceived,timestamp:e.timestamp},!this.isCounting)return;const n=Object.values(this.prebidAuctions).reduce(((e,t)=>(e.push(...t.bidsReceived),e)),[]),i=t.getAllWinningBids()||[],o=n.map((e=>{const t=this.prebidAuctions[e.auctionId]?.bidderRequests.find((({bidderCode:t})=>t===e.bidderCode));return{compoundId:`${e.adUnitCode}_${e.adId}`,mediaType:e.mediaType,bidderCode:e.bidderCode,adUnitCode:e.adUnitCode,isWinningBid:i.some((t=>t.adId===e.adId)),hasAnonymised:t?.ortb2?.user?.data?.findIndex((e=>e?.name?.indexOf("anonymised")>-1))>-1||t?.ortb2?.user?.keywords?.indexOf("perid=default")>-1}}));this.allImpressions=o.reduce(((e,t)=>{const n=t.compoundId;if(this.sentImpressionKeys.includes(n))return a().debug("Prebid Impression already counted on previous page view:",n),e;return{appnexus:!0,smartadserver:!0,pubmatic:!0,onetag:!0}[t.bidderCode]?(e[n]={mediaType:t.mediaType,hasAnonymised:t.hasAnonymised,isWinningBid:t.isWinningBid,bidderCode:t.bidderCode},e):(a().debug("Skip counting Prebid Impression from not allowed bidder:",t.bidderCode),e)}),this.allImpressions),localStorage.setItem(q.H.IdwImpressionsKey,JSON.stringify(this.allImpressions))}))}))}catch(e){a().warn("Failed to count Prebid impressions:",e)}}}class ye{constructor(e){me(this,"allImpressions",void 0),me(this,"observer",null),me(this,"reduceParameters",((e,t)=>(e[t[0]]=t[1],e))),this.allImpressions=e}start(){const e=()=>{this.observer=new PerformanceObserver((e=>{e.getEntries().forEach((e=>{"fetch"!==e.initiatorType&&"xmlhttprequest"!==e.initiatorType||!/(pubads.g.doubleclick.net|pagead2.googlesyndication.com|g.doubleclick.net)/.test(e.name)||(this.handleRequest(e.name),o.qQ.gptTargetingOn&&!e.name.toLocaleLowerCase().includes("anonymised")&&a().warn("GPT Targeting is enabled but the AD request does not include anonymised segments"))}))})),this.observer.observe({entryTypes:["resource"]})};window.PerformanceObserver&&window.PerformanceObserver.supportedEntryTypes.includes("resource")?e():a().warn("PerformanceObserver not supported in this browser. Will not be able to count Amazon TAM impressions.")}stop(){this.observer&&(this.observer.disconnect(),this.observer=null)}handleRequest(e){try{const t=e=>{if(!e)return{};const t=e.split("&").filter((e=>/^enc_prev_ius|^iu_parts|^prev_iu_szs|^iu|^prev_scp|^cust_params|^correlator|^amzn|^fp/.test(e))),n={};return t.forEach((e=>{const[t,i]=e.split("=");n[t]=decodeURIComponent(i)})),Object.keys(n).length>0&&a().debug("TAM parsed url parameters",n),n},n=e=>{const t=[],n={targeting:{},adUnit:"",amzniid:void 0,amznbid:void 0,amznsz:void 0,hb_format:void 0,hb_adid:void 0,sizes:[]};return e.prev_iu_szs?e.prev_iu_szs.split(",").forEach((e=>{t.push({...n,sizes:e.split("|")})})):e.iu&&t.push(n),Object.assign(e,{slots:t}),e},i=e=>{const t=[],n=this.parseCustomParams(e);return e.prev_scp&&(e.prev_scp.split("|")||[]).forEach((e=>{const n=(e.split("&")||[]).map((e=>e.split("="))).reduce(this.reduceParameters,{});n&&t.push(n)})),e.slots.forEach(((i,o)=>{let r=[];if(e.iu_parts&&e.enc_prev_ius){const t=e.iu_parts.split(",");r=e.enc_prev_ius.split(",").map((e=>e.split("/"))).map((e=>e.map((e=>t[e])).join("/")))}else e.iu&&r.push(e.iu);i.targeting=t[o],Object.assign(i.targeting||{},n||{}),i.adUnit=r[o],i.amzniid=t[o]?.amzniid,i.amznbid=t[o]?.amznbid,i.amznsz=t[o]?.amznsz,i.hb_format=t[o]?.hb_format??"banner",i.hb_adid=t[o]?.hb_adid})),{slots:e.slots}},o=(e,t)=>e.concat(t.slots),r=(e,t)=>{if(!e)return!1;const n=t.toLowerCase();return Object.keys(e).some((e=>e.toLowerCase()===n))},s=e=>[{name:e}].map((e=>e.name.split("?")[1])).map(t).map(n).map(i).reduce(o,[]),c=s(e);if(c.length>0){a().debug("TAM slots with bids",c);c.map((e=>{const t=e.hb_adid;return{mediaType:e.hb_format,hasAnonymised:r(e.targeting,"anonymised"),isWinningBid:!!e.amznbid&&!!e.amzniid,bidderCode:"amazon",compoundId:`${e.adUnit}${t?`_${t}`:""}`}})).forEach((e=>{this.allImpressions[e.compoundId]?a().debug("TAM new Impression already counted:",e):(this.allImpressions[e.compoundId]=e,delete e.compoundId,localStorage.setItem(q.H.IdwImpressionsKey,JSON.stringify(this.allImpressions)))}))}}catch(e){a().warn("TAM Error handling intercepted request:",e)}}parseCustomParams(e){return(e.cust_params&&e.cust_params.split("&")||[]).map((e=>e.split("="))).reduce(this.reduceParameters,{})}}class be{constructor(){me(this,"allImpressions",void 0),me(this,"sentImpressionKeys",void 0),me(this,"gptBidCounter",void 0),me(this,"prebidBidCounter",void 0),me(this,"tamBidCounter",void 0),this.sentImpressionKeys=[],this.allImpressions={},this.gptBidCounter=new we(this.allImpressions),this.prebidBidCounter=new ve(this.allImpressions,this.sentImpressionKeys),this.tamBidCounter=new ye(this.allImpressions)}start(){this.gptBidCounter.start(),this.prebidBidCounter.start(),this.tamBidCounter.start()}stop(){this.gptBidCounter.stop(),this.prebidBidCounter.stop(),this.tamBidCounter.stop()}clearImpressions(){try{localStorage.removeItem(q.H.IdwImpressionsKey),this.sentImpressionKeys=Object.keys(this.allImpressions).reduce(((e,t)=>(this.sentImpressionKeys.includes(t)||e.push(t),e)),this.sentImpressionKeys);for(const e in this.allImpressions)this.allImpressions[e]&&delete this.allImpressions[e]}catch(e){a().warn("Failed to clear impressions:",e)}}getFormattedImpressions(){try{const e=JSON.parse(localStorage.getItem(q.H.IdwImpressionsKey)??"{}");return this.formatImpressionsPayload(e)}catch(e){return a().warn(`Failed to parse impressions: ${e}`),[]}}formatImpressionsPayload(e){const t={};for(const n in e){const i=e[n],o=i.bidderCode,r=i.mediaType,s=i.hasAnonymised?1:0,a=i.isWinningBid?1:0;t[o]||(t[o]={}),t[o][r]||(t[o][r]={total:0,has_anon:0,win:0,win_has_anon:0}),t[o][r].total+=1,t[o][r].has_anon+=s,t[o][r].win+=a,t[o][r].win_has_anon+=a&&s}return Object.keys(t).reduce(((e,n)=>(e.push({bidder_code:n,...t[n]}),e)),[])}}var Ce=n(370);const Ie="[AudienceLift Meta Pixel]",Se="[AudienceLift Google GTM]",Pe="AudienceLift";let Te;!function(e){e.Entry="Entry",e.Exit="Exit"}(Te||(Te={}));const _e=e=>{if(!e)return new Set;try{const t=JSON.parse(e);return new Set(Array.isArray(t)?t:[])}catch(e){return a().warn(`[AudienceLift] Failed to parse cohort IDs: ${e}`),new Set}};const ke=(e=[])=>{const t=e instanceof Set?Array.from(e):e;if(0===t.length)return[];const n=[];let i="";for(const e of t){const t=i?`${i},${e}`:e;t.length<=100?i=t:(i&&n.push(i),i=e)}return i&&n.push(i),n},Ae=()=>{const e=localStorage.getItem(q.H.IdwCohortIdsKey);return e?JSON.parse(e):[]},Le=(e,t)=>{try{const n={event:e,...t};if("function"==typeof window.gtag)return void window.gtag?.("event",e,n);const i=oe()||X;window[i]=window[i]||[],window[i].push(n)}catch(e){a().warn(`${Se} Failed to send GTM event: ${e}`)}},Ee=(e,t="AudienceLiftUpdate")=>{const n=ke(e);if(a().debug(`${Se} Split ${e.length} cohorts into ${n.length} chunk(s)`),n.length){const e={};n.forEach(((n,i)=>{const o=`audience_signal${i>=1?i+1:""}`;a().debug(`${Se} Sending GTM event: ${t} with ${o}="${n}"`),e[o]=n})),Le(t,e)}},xe=async()=>{try{const e=await z.T.getUser();if(!e?.profile?.cuid)return;const t=await(async e=>{const t=(new TextEncoder).encode(e),n=await crypto.subtle.digest("SHA-256",t);return Array.from(new Uint8Array(n)).map((e=>("00"+e.toString(16)).slice(-2))).join("")})(e.profile.cuid);localStorage.setItem(q.H.AnonAudienceMemberId,t)}catch(e){a().warn(`${Ie} Failed to generate external id: ${e}`)}},Oe="trackCustom",$e=(e,t,n)=>{if("function"!=typeof window.fbq)return void a().warn(`${Ie} fbq function is not available. Make sure Meta Pixel is installed.`);const i=t?Te.Entry:Te.Exit;try{if(n){const t=`${Pe}${i}_${e}`;window.fbq(Oe,t,{}),a().debug(`${Ie} Core - ${i} event sent: ${t}`)}else{const t=`${Pe}${i}`;window.fbq(Oe,t,{audience_signal:e},{eventID:e}),a().debug(`${Ie} Non-Core - ${i} event sent: ${t}, audience_signal: ${e}`)}}catch(t){a().warn(`${Ie} Failed to send ${i} event for cohort ${e}: ${t}`)}},Ue=e=>{(e=>{if(!e.fbPixelOn)return void a().debug(`${Ie} Tracking is disabled`);const t=new Set(e.fbPixelCohortIds||[]);if(0===t.size)return void a().warn(`${Ie} No cohorts configured in fbPixelCohortIds`);const n=e.fbPixelCoreOn||!1;a().info(`${Ie} Tracking initialized. Core Pixel: ${n}, Configured cohorts: ${t.size}`);try{const t=Ae();a().debug(`${Ie} Retrieved ${t?.length||0} cohort IDs from localStorage`);const n=Array.from(t).filter((t=>e.fbPixelCohortIds.includes(t)));n?.length?localStorage.setItem(q.H.AnonAudienceMeta,n.join(",")):localStorage.removeItem(q.H.AnonAudienceMeta)}catch(e){a().debug(`${Ie} Error set initial audience cohort IDs to localStorage`)}(0,Ce.o)(q.H.IdwCohortIdsKey,(i=>{const o=_e(i.oldValue),r=_e(i.newValue),{added:s,removed:c}=((e,t)=>{const n=[],i=[];return t.forEach((t=>{e.has(t)||n.push(t)})),e.forEach((e=>{t.has(e)||i.push(e)})),{added:n,removed:i}})(o,r);s.forEach((e=>{t.has(e)?$e(e,!0,n):a().debug(`${Ie} Skipping entry event for unconfigured cohort: ${e}`)})),c.forEach((e=>{t.has(e)?$e(e,!1,n):a().debug(`${Ie} Skipping exit event for unconfigured cohort: ${e}`)})),(s.length>0||c.length>0)&&a().debug(`${Ie} Cohort changes detected - Added: ${s.length}, Removed: ${c.length}`);try{a().debug(`${Ie} Retrieved ${r?.size||0} cohort IDs from localStorage`);const t=Array.from(r).filter((t=>e.fbPixelCohortIds.includes(t)));t?.length?localStorage.setItem(q.H.AnonAudienceMeta,t.join(",")):localStorage.removeItem(q.H.AnonAudienceMeta)}catch(e){a().debug(`${Ie} Error set audience cohort IDs to localStorage`)}})),xe(),window.addEventListener(le,xe)})(e),(e=>{if(!e.gtmOn)return void a().debug(`${Se} Tracking is disabled`);if(!e.gtmCohortIds?.length)return void a().warn(`${Se} No cohorts configured in gtmCohortIds`);a().info(`${Se} Tracking initialized. Configured cohorts: ${e.gtmCohortIds.length}`);try{const t=Ae();a().debug(`${Se} Retrieved ${t?.length||0} cohort IDs from localStorage`);const n=Array.from(t).filter((t=>e.gtmCohortIds.includes(t)));a().debug(`${Se} Filtered to ${n.length} configured cohorts: ${n.join(", ")}`),n.length?Ee(n):a().debug(`${Se} No configured cohorts found in new cohort IDs`);try{const e=ke(n)?.[0];e?.length?localStorage.setItem(q.H.AnonAudienceGoogle,e):localStorage.removeItem(q.H.AnonAudienceGoogle)}catch(e){a().debug(`${Se} Error set initial audience cohort IDs to localStorage`)}}catch(e){a().debug(`${Se} Error loading initial cohort IDs from localStorage`)}(0,Ce.o)(q.H.IdwCohortIdsKey,(t=>{if(t.oldValue===t.newValue)return;const n=_e(t.newValue);a().debug(`${Se} Parsed ${n.size} cohort IDs from localStorage`);const i=Array.from(n).filter((t=>e.gtmCohortIds.includes(t)));a().debug(`${Se} Filtered to ${i.length} configured cohorts: ${i.join(", ")}`),i.length?Ee(i):a().debug(`${Se} No configured cohorts found in new cohort IDs`);try{const e=ke(i)?.[0];e?.length?localStorage.setItem(q.H.AnonAudienceGoogle,e):localStorage.removeItem(q.H.AnonAudienceGoogle)}catch(e){a().debug(`${Se} Error set audience cohort IDs to localStorage`)}}))})(e)};async function Me(){a().info("start Anonymised Publisher Tag"),Ue(o.qQ);const e="publisher"===o.qQ.tagType?new be:null;new pe(o.qQ,z.T,e).build().then((()=>{if(fe._){G(window.location.href.includes("localhost")?"http://localhost:3000/anondebug.js":o.qQ.idwServicesConf.anonDebugScript)}})).catch((e=>{a().warn(`Error during the Tag loading: ${e}`)}))}},328:(e,t,n)=>{"use strict";var i=n(890);var o=n(65),r=n.n(o);async function s(){return new Promise((e=>{i.qQ.overrideHasConsent||i.qQ.softPrivacyRegulated?(r().debug("Consider TCF API ready because of overrideHasConsent or softPrivacyRegulated is true"),e(!0)):window.__tcfapi?window.__tcfapi("ping",2,(t=>{e("loaded"===t.cmpStatus||"loading"===t.cmpStatus)})):e(!1)}))}async function a(){return new Promise((e=>{e(window.OneTrust||window.Optanon)}))}async function c(){return new Promise((e=>{e(!!window._iub?.cs?.consent?.purposes)}))}async function l(){return![].some((e=>location.host.indexOf(e)>-1))}var d=n(368),u=n(62),g=n(274);async function h(e){const t={method:"GET",headers:{"Content-Type":"application/json"}};try{const n=performance.now(),i=await(0,g.n)(`${e.idwServicesConf.idwHealthCheckUrl}`,t),o=performance.now(),s=Math.round(o-n);r().debug(`Health check from ${e.idwServicesConf.idwHealthCheckUrl}, Time: ${s}ms, response.url: ${i?.url}`);return i?.ok&&(!i?.url||i?.url===e.idwServicesConf.idwHealthCheckUrl)?s:null}catch(e){return null}}var p=n(319);async function f(e,t,n=100){async function i(e){return new Promise((t=>{setTimeout((()=>{t(!0)}),e)}))}let o=0,r=await e();for(;!r&&o<=n;)await i(100),r=await e(),o++;if(!r)throw t}async function m(){return new Promise((e=>{e(!!window.Bootstrapper?.gateway)}))}var w=n(131);const v=r().methodFactory;r().methodFactory=function(e,t,n){const i=v(e,t,n);return function(e){i(`Anonymised tag: ${e}`)}},r().setLevel(r().getLevel());var y=n(138);const b=async(e,t,n,i)=>{const o={method:"POST",headers:{"Content-Type":"application/json",Authorization:"Bearer "+i},body:JSON.stringify({user_id:t,client_id:n})},s=await(0,g.n)(`${e.idwServicesConf.idwMetricsRootUrl}/v3/usersync`,o);s.ok||r().warn(`UserSync API call failed: ${s.status}`)};var C=n(370);if(window.location.search.includes("hydra-error")||window.location.search.includes("error=")){const e=window.localStorage.getItem("idw-signin-from")??"/";window.history.replaceState({},"",e)}function I(){Promise.resolve().then(n.bind(n,733)).then((({bootstrap:e})=>{e()}))}!async function(){window._anonymised_tag=window._anonymised_tag??{},window._anonymised_tag.version=p.A,window._anonymised_tag.getConfig=()=>({...i.qQ}),(e=>{switch(e){case w.F.SILENT:r().setLevel(r().levels.SILENT);break;case w.F.ERROR:r().setLevel(r().levels.ERROR);break;case w.F.WARN:r().setLevel(r().levels.WARN);break;case w.F.INFO:r().setLevel(r().levels.INFO);break;case w.F.DEBUG:r().setLevel(r().levels.DEBUG);break;case w.F.TRACE:r().setLevel(r().levels.TRACE);break;default:r().setLevel(r().levels.INFO)}})(i.qQ.errorReportingLevel),i.qQ?.clientId&&"string"==typeof i.qQ?.clientId&&""!==i.qQ?.clientId.trim()&&(r().debug(`Client ID is present - ${i.qQ.clientId}`),1)?function(){try{const e=/bot\\b|index|Googlebot|spider|crawl|wget|slurp|sogou|baiduspider|Mediapartners-Google/i;return-1!==navigator.userAgent.search(e)||!window.document||!window.document.getElementsByTagName}catch{return!1}}()?r().warn("Anonymised tag will not start. Bot detected on site"):window.location.protocol.startsWith("file:")?r().warn("Anonymised tag will not start. Running on file protocol"):async function(){try{const[e,t,n]=await Promise.all([l(),(0,i.rY)(),h(i.qQ)]);if(!e)return void r().warn(`Tag will not start. Disabled on the '${window.location.hostname}' domain`);if(!n)return void r().warn(`Tag will not start. The domain '${window.location.hostname}' is pending verification`);if(!t)return void r().warn(`Tag will not start. The config '${window.location.hostname}' failed to load`)}catch(e){return void r().warn(`Tag will not start: ${e}`)}try{await Promise.all([!!i.qQ.cmpProviderCookieGroup||f(s,"waiting for TCF API to be ready",140),!(i.qQ.cmpProvider&&i.qQ.cmpProvider.includes(u.P.OneTrust))||f(a,"waiting for OneTrust API to be ready",80),!(i.qQ.cmpProvider&&i.qQ.cmpProvider.includes(u.P.Iubenda))||f(c,"waiting for Iubenda API to be ready",80),!(i.qQ.cmpProvider&&i.qQ.cmpProvider.includes(u.P.Ensighten))||f(m,"waiting for Ensighten API to be ready",80)]),window.googletag=window.googletag||{cmd:[]},window.googletag.cmd.push((()=>{window.googletag.pubads().setTargeting(`${d.H.anonymised}ClientId`,i.qQ.clientId)}));const e=window.localStorage.getItem(d.H.IdwCohortIdsKey);i.qQ.gptTargetingOn&&e&&window.googletag.cmd.push((()=>{var t;t=d.H.anonymised,window.googletag.pubads().getTargetingKeys()?.some((e=>e.toLowerCase()===t))||window.googletag.pubads().setTargeting(d.H.anonymised,JSON.parse(e))})),(async e=>{const t={};try{const e=JSON.parse(localStorage.getItem(d.H.AnonSignalLift)||"{}");void 0!==e.iabAudience&&(t.iabAudience=e.iabAudience)}catch(e){r().debug(`Failed to read or parse ${d.H.AnonSignalLift} from localStorage: ${e}`)}try{t.settings={ppidEnabled:e.ppidEnabled,ppsEnabled:e.ppsEnabled,secureSignalsEnabled:e.secureSignalsEnabled},t.clientId=e.clientId;const n=await y.T.getUser();n?.profile?.cuid&&(t.cuid=n.profile.cuid);const i=JSON.stringify(t);localStorage.setItem(d.H.AnonSignalLift,i),r().debug(`Set SignalLift config to LS: ${i}`)}catch(e){r().warn(`SignalLift initialization failed: ${e}`)}})(i.qQ),(async e=>{if(e.userSyncEnabled){const t=window.localStorage.getItem(d.H.AnonUserSync),n=await y.T.getUser();t&&n&&(await b(e,t,e.clientId,n.access_token),r().debug(`UserSync was sent ${t}`));const i=async t=>{const n=await y.T.getUser();t.newValue&&t.newValue!==t.oldValue&&n&&(await b(e,t.newValue,e.clientId,n.access_token),r().debug(`UserSync was sent ${t.newValue}, (local storage event)`))};(0,C.o)(d.H.AnonUserSync,i)}})(i.qQ),"complete"===document.readyState?(r().debug("Tag is already loaded"),I()):window.addEventListener("load",(function(){r().debug("Tag loaded via load event"),I()}))}catch(e){r().warn(`Tag will not start because of the timeout while ${e}`)}}():r().warn("Anonymised tag will not start. Client ID is not specified")}()},319:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});const i="1.8.43"},138:(e,t,n)=>{"use strict";n.d(t,{T:()=>i});const i=new class{async getUser(){return new Promise(((e,t)=>{const n=setTimeout((()=>{t(new Error("Timeout waiting for window._anonymised_tag.auth object"))}),1e4),i=setInterval((()=>{window._anonymised_tag?.auth?.getUser&&(clearTimeout(n),clearInterval(i),e(window._anonymised_tag?.auth.getUser()))}),100)}))}async queueLogin(){return new Promise(((e,t)=>{const n=setTimeout((()=>{t(new Error("Timeout waiting for window._anonymised_tag.auth object"))}),1e4),i=setInterval((()=>{window._anonymised_tag?.auth?.queueLogin&&(clearTimeout(n),clearInterval(i),window._anonymised_tag?.auth.queueLogin(),e())}),100)}))}}},62:(e,t,n)=>{"use strict";let i;n.d(t,{P:()=>i}),function(e){e.Quantcast="quantcast",e.Consentmanager="consentmanager",e.Liveramp="liveramp",e.Clickio="clickio",e.Sourcepoint="sourcepoint",e.Iubenda="iubenda",e.Uniconsent="uniconsent",e.OneTrust="onetrust",e.CookiePro="cookiepro",e.CookieBot="cookiebot",e.Googlefc="googlefc",e.Admiral="admiral",e.Ensighten="ensighten",e.CookieScript="cookiescript",e.Klaro="klaro",e.Civic="civic",e.Cookieyes="cookieyes"}(i||(i={}))},358:(e,t,n)=>{"use strict";let i;n.d(t,{t:()=>i}),function(e){e.colorPrimary="color-primary",e.errorReportingLevel="error-reporting-level",e.cmpProvider="cmp-provider",e.cmpProviderCookieGroup="cmp-provider-cookie-group",e.environment="environment",e.notIntegrateCmp="not-integrate-cmp",e.overrideHasConsent="override-has-consent",e.softPrivacyRegulated="soft-privacy-regulated",e.hideButton="hide-button",e.retargetingOn="retargeting-on",e.gptTargetingOn="gpt-targeting-on",e.conversionOn="conversion-on",e.extendLoginToSubdomains="extend-login-to-subdomains",e.clientId="client-id",e.loginExceptionPages="login-exception-pages",e.loginInclusionPages="login-inclusion-pages",e.immediateLoginPages="immediate-login-pages",e.loginInNewTab="login-in-new-tab",e.iframeLogin="iframe-login",e.loginRedirect="login-redirect",e.metricsRootUrl="metrics-root-url",e.metricsCollectorUrl="metrics-collector-url",e.retargetingScriptUrl="retargeting-script-url",e.retargetingSegmentsUrl="retargeting-segments-url",e.healthCheckUrl="health-check-url",e.errorReportingUrl="error-reporting-url",e.authority="authority",e.tagType="tag-type",e.fbPixelOn="fb-pixel-on",e.fbPixelCoreOn="fb-pixel-core-on",e.fbPixelCohortIds="fb-pixel-cohort-ids",e.gtmOn="gtm-on",e.gtmCohortIds="gtm-cohort-ids"}(i||(i={}))},890:(e,t,n)=>{"use strict";n.d(t,{rY:()=>L,qQ:()=>A});const i=(e,t)=>{const n=new URL(e),i=new URLSearchParams(n.search);for(const e in t)void 0!==t[e]&&i.set(e,t[e]);return n.search=i.toString(),n.hash="",n.toString()};var o=n(319),r=n(131);const s="https://api.dev.anonymised.io",a="https://api.anonymised.io",c="https://cdn1.anonymised.io",l="https://storage.googleapis.com/idward-cmp-v2-dev",d="https://aegis.dev.anonymised.io",u="https://aegis.dev.anonymised.io",g={type:"DEV",tagType:"publisher",oidcConf:{authority:d,client_id:window.location.origin,redirect_uri:i(window.location.href,{callback:"in"}),response_type:"code",scope:"token profile id_token",metadata:{issuer:d,authorization_endpoint:`${d}/oauth2/auth`,userinfo_endpoint:`${d}/userinfo`,token_endpoint:`${u}/oauth2/token`},accessTokenExpiringNotificationTimeInSeconds:600},idwServicesConf:{idwMetricsRootUrl:s,idwMetricsCollector:`${s}/metrics/collect`,idwRetargetingScript:"https://static.dev.anonymised.io/light/retargeting.js",idwBidderCheckerScript:`${l}/light/bidderchecker.js?v=${o.A}`,idwDataAccountWebUrl:"https://data-account-web-lwvpr3pb6a-ew.a.run.app",idwRetargetingSegmentsUrl:"https://user-segments-lwvpr3pb6a-ew.a.run.app/retargeting",idwHealthCheckUrl:`${u}/health`,idwErrorReportingUrl:`${s}/v3/error`,anonDebugScript:`${l}/light/anondebug.js`,anonmStaticDomain:"https://static.dev.anonymised.io",conversionScript:`${l}/light/conversion.js`},notIntegrateCmp:!1,overrideHasConsent:!1,softPrivacyRegulated:!1,hideButton:!1,retargetingOn:!1,gptTargetingOn:!1,conversionOn:!1,extendLoginToSubdomains:!1,errorReportingLevel:r.F.DEBUG,loginInNewTab:!1,iframeLogin:!1,loginRedirect:!1,ppidEnabled:!1,ppsEnabled:!1,secureSignalsEnabled:!1,userSyncEnabled:!1},h="https://account.anonymised.io/login",p="https://aegis.anonymised.io",f={type:"PROD",tagType:"publisher",oidcConf:{authority:h,client_id:window.location.origin,redirect_uri:i(window.location.href,{callback:"in"}),response_type:"code",scope:"token profile id_token",metadata:{issuer:h,authorization_endpoint:`${h}/oauth2/auth`,userinfo_endpoint:`${h}/userinfo`,token_endpoint:`${p}/oauth2/token`},accessTokenExpiringNotificationTimeInSeconds:259200},idwServicesConf:{idwMetricsRootUrl:a,idwMetricsCollector:`${a}/metrics/collect`,idwRetargetingScript:"https://cdn1.anonymised.io/light/retargeting.js",idwBidderCheckerScript:`${c}/light/bidderchecker.js?v=${o.A}`,idwDataAccountWebUrl:"https://account.anonymised.io",idwRetargetingSegmentsUrl:"https://user-segments.anonymised.io/retargeting",idwHealthCheckUrl:`${p}/health`,idwErrorReportingUrl:`${a}/v3/error`,anonDebugScript:"https://storage.googleapis.com/idward-cmp-v2-dev/light/anondebug.js",anonmStaticDomain:"https://static.anonm.io",conversionScript:`${c}/light/conversion.js`},notIntegrateCmp:!1,overrideHasConsent:!1,softPrivacyRegulated:!1,hideButton:!1,retargetingOn:!1,gptTargetingOn:!1,conversionOn:!1,extendLoginToSubdomains:!1,errorReportingLevel:r.F.ERROR,loginInNewTab:!1,iframeLogin:!1,loginRedirect:!1,ppidEnabled:!1,ppsEnabled:!1,secureSignalsEnabled:!1,userSyncEnabled:!1};var m=n(65),w=n.n(m),v=n(358);let y;!function(e){e.colorPrimary="idw_color_primary",e.errorReportingLevel="idw_error_reporting_level",e.cmpProvider="idw_cmp_provider",e.cmpProviderCookieGroup="idw_cmp_provider_cookie_group",e.environment="idw_environment",e.notIntegrateCmp="idw_not_integrate_cmp",e.overrideHasConsent="override_has_consent",e.softPrivacyRegulated="soft_privacy_regulated",e.hideButton="idw_hide_button",e.retargetingOn="retargeting_on",e.gptTargetingOn="gpt_targeting_on",e.extendLoginToSubdomains="extend_login_to_subdomains",e.clientId="idw_client_id",e.loginExceptionPages="idw_login_exception_pages",e.loginInclusionPages="idw_login_inclusion_pages",e.immediateLoginPages="idw_immediate_login_pages",e.metricsRootUrl="idw_metrics_root_url",e.metricsCollectorUrl="idw_metrics_collector_url",e.retargetingScriptUrl="idw_retargeting_script_url",e.retargetingSegmentsUrl="idw_retargeting_segments_url",e.healthCheckUrl="idw_health_check_url",e.errorReportingUrl="idw_error_reporting_url",e.authority="idw_authority"}(y||(y={}));var b=n(274);async function C(e){const t={method:"GET",headers:{"Content-Type":"application/json"}};try{const n="DEV"===e?"https://api.dev.anonymised.io/v3/tag/configs":"https://api.anonymised.io/v3/tag/configs",i=await(0,b.n)(n,t);if(!i.ok)return{config:{},isTagVerified:!1};return{config:await i.json(),isTagVerified:!0}}catch(e){let t=!0;return e.toString().includes("TypeError")&&(t=!1),{isTagVerified:t,config:{}}}}function I(e){if(!e)return{};const t={},n={colourPrimary:"colorPrimary",hideIdwButton:"hideButton",gptTargeting:"gptTargetingOn",metricsCollector:"metricsCollectorUrl",retargetingScript:"retargetingScriptUrl"};return Object.entries(e).forEach((([e,i])=>{t[n[e]||e]=i})),t}var S=n(182);function P(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function T(e,t){try{return e.replace(/[[\] '"]/g,"").split(",")}catch{return void w().warn(`Error parsing '${t}' setting value ${e}`)}}const _=document.currentScript,k=new class{constructor(e,t=C,n=window.localStorage,i=window.sessionStorage){P(this,"pluginConfig",void 0),P(this,"scriptElement",void 0),P(this,"localStorage",void 0),P(this,"sessionStorage",void 0),P(this,"remoteConfigPromise",null),P(this,"attributeConfig",void 0),P(this,"localStorageConfig",void 0),P(this,"globalVariableConfig",void 0),P(this,"sessionStorageConfig",void 0),this.scriptElement=e,this.localStorage=n,this.sessionStorage=i,this.attributeConfig=this.getAttributeConfig(),this.localStorageConfig=this.getLocalStorageConfig(),this.globalVariableConfig=I(this.getGlobalVariableConfig()),this.sessionStorageConfig=this.getSessionStorageConfig();const o=this.mergeConfigs(this.attributeConfig,this.localStorageConfig,this.globalVariableConfig,this.sessionStorageConfig);if(this.hasCompleteConfig(this.globalVariableConfig))w().debug("Using preloaded configuration from API-served loader"),this.remoteConfigPromise=null,window._anonymised_tag=window._anonymised_tag??{isTagVerified:!0},window._anonymised_tag.isTagVerified=!0;else{const e="dev"===o.environment?"DEV":"PROD";w().debug(`Fetching configuration from remote API (${e})`),this.remoteConfigPromise=t(e),window._anonymised_tag=window._anonymised_tag??{isTagVerified:!1},this.initRemoteConfig()}this.pluginConfig=this.mapAttributeConfigToConfig(o),window._anonymised_tag.pluginConfig=this.pluginConfig}async initRemoteConfig(){if(!this.remoteConfigPromise)return;const{config:e}=await this.remoteConfigPromise,t=I(e),n=this.mergeConfigs(this.attributeConfig,this.localStorageConfig,this.globalVariableConfig,t,this.sessionStorageConfig);this.pluginConfig=this.mapAttributeConfigToConfig(n),window._anonymised_tag.pluginConfig=this.pluginConfig}extractConfigStorageValues(e){const t={};return Object.entries(v.t).forEach((([n,i])=>{const o=e(i)??e(y[n]);o&&(t[n]=o)})),t}getAttributeConfig(){return this.extractConfigStorageValues((e=>this.scriptElement.getAttribute(e)))}getLocalStorageConfig(){return this.extractConfigStorageValues((e=>this.localStorage.getItem(e)))}getSessionStorageConfig(){return this.extractConfigStorageValues((e=>this.sessionStorage.getItem(e)))}getGlobalVariableConfig(){if(!window._anonymised_tag?.preloadedConfig)return{};const e=window._anonymised_tag.preloadedConfig;return"object"!=typeof e||null===e?(w().warn("Invalid preloadedConfig type, expected object"),{}):(w().debug("Found preloaded configuration in global variable",e),e)}hasCompleteConfig(e){return Object.keys(e).length>0&&Object.values(e).some((e=>null!=e&&""!==e))}mergeConfigs(...e){return Object.assign({},...e)}async isTagVerified(){if(!this.remoteConfigPromise)return window._anonymised_tag.isTagVerified??!0;const{isTagVerified:e}=await this.remoteConfigPromise;return window._anonymised_tag.isTagVerified=e,e}mapAttributeConfigToConfig(e){const t="dev"===e.environment?g:f;return this.mapStringProperties(e,t),this.mapBooleanProperties(e,t),this.mapArrayProperties(e,t),this.mapServiceConfig(e,t),this.mapOidcConfig(e,t),S._&&(t.errorReportingLevel=r.F.DEBUG),this.validateLoginInNewTabSettings(t),t}parseBoolean(e){return"true"===e}mapStringProperties(e,t){e.tagType&&(t.tagType=e.tagType),e.colorPrimary&&(t.colorPrimary=e.colorPrimary),e.errorReportingLevel&&(t.errorReportingLevel=e.errorReportingLevel),e.cmpProvider&&(t.cmpProvider=e.cmpProvider),e.cmpProviderCookieGroup&&(t.cmpProviderCookieGroup=e.cmpProviderCookieGroup),e.clientId&&(t.clientId=e.clientId)}mapBooleanProperties(e,t){void 0!==e.notIntegrateCmp&&(t.notIntegrateCmp=this.parseBoolean(e.notIntegrateCmp)),void 0!==e.overrideHasConsent&&(t.overrideHasConsent=this.parseBoolean(e.overrideHasConsent)),void 0!==e.softPrivacyRegulated&&(t.softPrivacyRegulated=this.parseBoolean(e.softPrivacyRegulated)),void 0!==e.hideButton&&(t.hideButton=this.parseBoolean(e.hideButton)),void 0!==e.retargetingOn&&(t.retargetingOn=this.parseBoolean(e.retargetingOn)),void 0!==e.gptTargetingOn&&(t.gptTargetingOn=this.parseBoolean(e.gptTargetingOn)),void 0!==e.conversionOn&&(t.conversionOn=this.parseBoolean(e.conversionOn)),void 0!==e.extendLoginToSubdomains&&(t.extendLoginToSubdomains=this.parseBoolean(e.extendLoginToSubdomains)),void 0!==e.loginInNewTab&&(t.loginInNewTab=this.parseBoolean(e.loginInNewTab)),void 0!==e.iframeLogin&&(t.iframeLogin=this.parseBoolean(e.iframeLogin)),void 0!==e.loginRedirect&&(t.loginRedirect=this.parseBoolean(e.loginRedirect)),void 0!==e.ppidEnabled&&(t.ppidEnabled=this.parseBoolean(e.ppidEnabled)),void 0!==e.ppsEnabled&&(t.ppsEnabled=this.parseBoolean(e.ppsEnabled)),void 0!==e.secureSignalsEnabled&&(t.secureSignalsEnabled=this.parseBoolean(e.secureSignalsEnabled)),void 0!==e.userSyncEnabled&&(t.userSyncEnabled=this.parseBoolean(e.userSyncEnabled)),void 0!==e.fbPixelOn&&(t.fbPixelOn=this.parseBoolean(e.fbPixelOn)),void 0!==e.fbPixelCoreOn&&(t.fbPixelCoreOn=this.parseBoolean(e.fbPixelCoreOn))}mapArrayProperties(e,t){e.fbPixelCohortIds&&(t.fbPixelCohortIds=T(e.fbPixelCohortIds,v.t.fbPixelCohortIds)),e.gtmOn&&(t.gtmOn="true"===e.gtmOn),e.gtmCohortIds&&(t.gtmCohortIds=T(e.gtmCohortIds,v.t.gtmCohortIds)),e.loginExceptionPages&&(t.loginExceptionPages=T(e.loginExceptionPages,v.t.loginExceptionPages)),e.loginInclusionPages&&(t.loginInclusionPages=T(e.loginInclusionPages,v.t.loginInclusionPages)),e.immediateLoginPages&&(t.immediateLoginPages=T(e.immediateLoginPages,v.t.immediateLoginPages))}mapServiceConfig(e,t){e.metricsCollectorUrl&&(t.idwServicesConf.idwMetricsCollector=e.metricsCollectorUrl),e.metricsRootUrl&&(t.idwServicesConf.idwMetricsRootUrl=e.metricsRootUrl),e.retargetingScriptUrl&&(t.idwServicesConf.idwRetargetingScript=e.retargetingScriptUrl),e.retargetingSegmentsUrl&&(t.idwServicesConf.idwRetargetingSegmentsUrl=e.retargetingSegmentsUrl),e.healthCheckUrl&&(t.idwServicesConf.idwHealthCheckUrl=e.healthCheckUrl),e.errorReportingUrl&&(t.idwServicesConf.idwErrorReportingUrl=e.errorReportingUrl)}mapOidcConfig(e,t){e.authority&&(t.oidcConf={...t.oidcConf,authority:e.authority,metadata:{...t.oidcConf.metadata,issuer:e.authority,authorization_endpoint:`${e.authority}/oauth2/auth`,userinfo_endpoint:`${e.authority}/userinfo`}})}validateLoginInNewTabSettings(e){if(!e.loginInNewTab)return;[{value:e.immediateLoginPages,label:v.t.immediateLoginPages},{value:e.loginExceptionPages,label:v.t.loginExceptionPages},{value:e.loginInclusionPages,label:v.t.loginInclusionPages}].forEach((({value:e,label:t})=>{void 0!==e&&w().warn(`${t} setting is not supported when ${v.t.loginInNewTab} is enabled`)})),!0===e.overrideHasConsent&&w().warn(`${v.t.overrideHasConsent} setting is not supported when ${v.t.loginInNewTab} is enabled`),e.overrideHasConsent=!1}}(_),A=k.pluginConfig,L=k.isTagVerified.bind(k)},368:(e,t,n)=>{"use strict";let i;n.d(t,{H:()=>i}),function(e){e.IdwHydraHasErrorKey="IDW_HYDRA_HAS_ERROR",e.IdwCohortIdsKey="cohort_ids",e.idwScrollY="idw-scroll-y",e.IdwImpressionsKey="idw-impressions",e.anonymised="Anonymised",e.isOofUrl="idw-oof",e.idwOutdated="idw-outdated",e.AnonSignalLift="anon-sl",e.AnonSignalLiftGroup="anon-sl-group",e.AnonSignalLiftGroupNoUser="anon-sl-group-no-user",e.AnonSignalLiftGroupTimestamp="anon-sl-group-ts",e.AnonSignalLiftGroupSession="anon-sl-group-session",e.AnonUserSync="anon-hndshk",e.AnonAudienceMemberId="anon-audience-member",e.AnonAudienceMeta="anon-audiences-meta",e.AnonAudienceGoogle="anon-audiences-google"}(i||(i={}))},131:(e,t,n)=>{"use strict";let i;n.d(t,{F:()=>i}),function(e){e.TRACE="trace",e.DEBUG="debug",e.INFO="info",e.WARN="warn",e.ERROR="error",e.SILENT="silent"}(i||(i={}))},274:(e,t,n)=>{"use strict";n.d(t,{n:()=>o});var i=n(319);function o(e,t={}){const n={...t};return n.headers={...n.headers,"Anon-App-Version":i.A},fetch(e,n)}},182:(e,t,n)=>{"use strict";function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}n.d(t,{_:()=>r});class o{constructor(){i(this,"debug",void 0),this.debug=this.isUrlDebugTrue()}static getInstance(){return null===this.instance&&(this.instance=new o),this.instance}isUrlDebugTrue(){return"true"===new URLSearchParams(window.location.search).get("anon_debug")}get isDebug(){return this.debug}}i(o,"instance",null);const r=o.getInstance().isDebug},370:(e,t,n)=>{"use strict";n.d(t,{o:()=>o});const i={},o=(e,t,n={interval:5e3})=>{const o=i[e],r=n.interval??5e3;if(o){if(o.callbacks.push(t),r{const n=i[e];if(!n)return;const o=localStorage.getItem(e);if(t!==o){n.callbacks.slice().forEach((n=>{n({key:e,oldValue:t,newValue:o})})),i[e]&&(t=o,i[e].oldValue=o)}}),r);o.timer=n,o.interval=r}}else{let n=localStorage.getItem(e);const o=setInterval((()=>{const t=i[e];if(!t)return;const o=localStorage.getItem(e);if(n!==o){t.callbacks.slice().forEach((t=>{t({key:e,oldValue:n,newValue:o})})),i[e]&&(n=o,i[e].oldValue=o)}}),r);i[e]={oldValue:n,timer:o,callbacks:[t],interval:r}}return()=>((e,t)=>{const n=i[e];n&&(t?(n.callbacks=n.callbacks.filter((e=>e!==t)),0===n.callbacks.length&&(clearInterval(n.timer),delete i[e])):(clearInterval(n.timer),delete i[e]))})(e,t)}},353:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>r});var i=n(314),o=n.n(i)()(!1);o.push([e.id,"@import url(https://fonts.googleapis.com/css2?family=Open+Sans:wght@500;600&display=swap);"]),o.push([e.id,"#idw-plugin-container {\n display: flex;\n flex-direction: column;\n box-sizing: content-box;\n position: fixed;\n left: -160px;\n bottom: -160px;\n z-index: 999999;\n background-color: #fff;\n\n height: auto;\n max-width: 160px;\n width: 160px;\n min-width: 160px;\n color: #171717;\n line-height: 1rem;\n\n outline: 1px solid #171717;\n justify-content: flex-start;\n\n -webkit-box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);\n -moz-box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);\n box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);\n opacity: 0;\n transition: left .4s, bottom .4s, opacity .1s;\n}\n\n#idw-plugin-container.idw-open {\n left: 0;\n bottom: 0;\n opacity: 1;\n}\n\n#idw-plugin-buttons {\n display: flex;\n flex-direction: column;\n height: 100%;\n width: auto;\n}\n\n#idw-plugin-container .pluginBtn {\n border: none;\n padding: 1px 5px !important;\n margin: 0 !important;\n width: auto !important;\n height: 25px !important;\n box-sizing: border-box !important;\n\n border-radius: 0 !important;\n text-align: right !important;\n\n font-family: 'Open Sans', sans-serif !important;\n line-height: normal !important;\n text-transform: none !important;\n letter-spacing: normal !important;\n font-weight: 600 !important;\n font-size: 14px !important;\n\n background-color: #ffffff !important;\n transition: background-color 0.2s;\n cursor: pointer !important;\n}\n\n#idw-plugin-container .pluginBtn:hover {\n outline: 1px solid #ffffff !important;\n background-color: #171717 !important;\n color: #ffffff !important;\n}\n\n#idw-open-trigger {\n position: fixed;\n width: 50px;\n height: 50px;\n bottom: 0;\n left: 0;\n z-index: 999999;\n cursor: pointer;\n -webkit-clip-path: polygon(100% 100%, 0 100%, 0 0);\n clip-path: polygon(100% 100%, 0 100%, 0 0);\n background-color: #171717 !important;\n}\n\n#idw-open-trigger img {\n width: 28px;\n height: 28px;\n position: absolute;\n /* padding: 4px; */\n bottom: -2px;\n left: -2px;\n}",""]);const r=o},936:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>r});var i=n(314),o=n.n(i)()(!1);o.push([e.id,"/***************/\n/*MEDIA QUERIES*/\n/***************/\n/*\n ##Device: Tablets, Ipads (portrait)\n ##Screen: B/w 768px to 1024px\n*/\n@media (min-width: 768px) and (max-width: 1024px) {\n \n}\n/*\n ##Device: Most of the Smartphones Mobiles (Portrait)\n ##Screen: B/w 320px to 479px\n*/\n@media (min-width: 400px) and (max-width: 480px) {\n\n}",""]);const r=o},314:e=>{"use strict"; /* MIT License http://www.opensource.org/licenses/mit-license.php Author Tobias Koppers @sokra */e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n=function(e,t){var n=e[1]||"",i=e[3];if(!i)return n;if(t&&"function"==typeof btoa){var o=(s=i,a=btoa(unescape(encodeURIComponent(JSON.stringify(s)))),c="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(a),"/*# ".concat(c," */")),r=i.sources.map((function(e){return"/*# sourceURL=".concat(i.sourceRoot||"").concat(e," */")}));return[n].concat(r).concat([o]).join("\n")}var s,a,c;return[n].join("\n")}(t,e);return t[2]?"@media ".concat(t[2]," {").concat(n,"}"):n})).join("")},t.i=function(e,n,i){"string"==typeof e&&(e=[[null,e,""]]);var o={};if(i)for(var r=0;r=0&&t<=d.levels.SILENT)return t;throw new TypeError("log.setLevel() called with invalid level: "+e)}"string"==typeof e?g+=":"+e:"symbol"==typeof e&&(g=void 0),d.name=e,d.levels={TRACE:0,DEBUG:1,INFO:2,WARN:3,ERROR:4,SILENT:5},d.methodFactory=n||u,d.getLevel=function(){return null!=c?c:null!=a?a:s},d.setLevel=function(e,t){return c=m(e),!1!==t&&h(c),l.call(d)},d.setDefaultLevel=function(e){a=m(e),p()||d.setLevel(e,!1)},d.resetLevel=function(){c=null,f(),l.call(d)},d.enableAll=function(e){d.setLevel(d.levels.TRACE,e)},d.disableAll=function(e){d.setLevel(d.levels.SILENT,e)},d.rebuild=function(){if(r!==d&&(s=m(r.getLevel())),l.call(d),r===d)for(var e in o)o[e].rebuild()},s=m(r?r.getLevel():"WARN");var w=p();null!=w&&(c=m(w)),l.call(d)}(r=new g).getLogger=function(e){if("symbol"!=typeof e&&"string"!=typeof e||""===e)throw new TypeError("You must supply a name when creating a logger.");var t=o[e];return t||(t=o[e]=new g(e,r.methodFactory)),t};var h=typeof window!==t?window.log:void 0;return r.noConflict=function(){return typeof window!==t&&window.log===r&&(window.log=h),r},r.getLoggers=function(){return o},r.default=r,r},void 0===(o="function"==typeof i?i.call(t,n,t,e):i)||(e.exports=o)}()},452:e=>{ /** * Copyright (c) 2014-present, Facebook, Inc. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ var t=function(e){"use strict";var t,n=Object.prototype,i=n.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},r=o.iterator||"@@iterator",s=o.asyncIterator||"@@asyncIterator",a=o.toStringTag||"@@toStringTag";function c(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function(e,t,n){return e[t]=n}}function l(e,t,n,i){var o=t&&t.prototype instanceof m?t:m,r=Object.create(o.prototype),s=new A(i||[]);return r._invoke=function(e,t,n){var i=u;return function(o,r){if(i===h)throw new Error("Generator is already running");if(i===p){if("throw"===o)throw r;return E()}for(n.method=o,n.arg=r;;){var s=n.delegate;if(s){var a=T(s,n);if(a){if(a===f)continue;return a}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===u)throw i=p,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=h;var c=d(e,t,n);if("normal"===c.type){if(i=n.done?p:g,c.arg===f)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(i=p,n.method="throw",n.arg=c.arg)}}}(e,n,s),r}function d(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}e.wrap=l;var u="suspendedStart",g="suspendedYield",h="executing",p="completed",f={};function m(){}function w(){}function v(){}var y={};c(y,r,(function(){return this}));var b=Object.getPrototypeOf,C=b&&b(b(L([])));C&&C!==n&&i.call(C,r)&&(y=C);var I=v.prototype=m.prototype=Object.create(y);function S(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function P(e,t){function n(o,r,s,a){var c=d(e[o],e,r);if("throw"!==c.type){var l=c.arg,u=l.value;return u&&"object"==typeof u&&i.call(u,"__await")?t.resolve(u.__await).then((function(e){n("next",e,s,a)}),(function(e){n("throw",e,s,a)})):t.resolve(u).then((function(e){l.value=e,s(l)}),(function(e){return n("throw",e,s,a)}))}a(c.arg)}var o;this._invoke=function(e,i){function r(){return new t((function(t,o){n(e,i,t,o)}))}return o=o?o.then(r,r):r()}}function T(e,n){var i=e.iterator[n.method];if(i===t){if(n.delegate=null,"throw"===n.method){if(e.iterator.return&&(n.method="return",n.arg=t,T(e,n),"throw"===n.method))return f;n.method="throw",n.arg=new TypeError("The iterator does not provide a 'throw' method")}return f}var o=d(i,e.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,f;var r=o.arg;return r?r.done?(n[e.resultName]=r.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,f):r:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,f)}function _(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function k(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function A(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(_,this),this.reset(!0)}function L(e){if(e){var n=e[r];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,s=function n(){for(;++o=0;--r){var s=this.tryEntries[r],a=s.completion;if("root"===s.tryLoc)return o("end");if(s.tryLoc<=this.prev){var c=i.call(s,"catchLoc"),l=i.call(s,"finallyLoc");if(c&&l){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&i.call(o,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),k(n),f}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var i=n.completion;if("throw"===i.type){var o=i.arg;k(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,n,i){return this.delegate={iterator:L(e),resultName:n,nextLoc:i},"next"===this.method&&(this.arg=t),f}},e}(e.exports);try{regeneratorRuntime=t}catch(e){"object"==typeof globalThis?globalThis.regeneratorRuntime=t:Function("r","regeneratorRuntime = r")(t)}},74:(e,t,n)=>{var i=n(72),o=n(353);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.id,o,""]]);var r={insert:"head",singleton:!1};i(o,r);e.exports=o.locals||{}},47:(e,t,n)=>{var i=n(72),o=n(936);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.id,o,""]]);var r={insert:"head",singleton:!1};i(o,r);e.exports=o.locals||{}},72:(e,t,n)=>{"use strict";var i,o=function(){return void 0===i&&(i=Boolean(window&&document&&document.all&&!window.atob)),i},r=function(){var e={};return function(t){if(void 0===e[t]){var n=document.querySelector(t);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(e){n=null}e[t]=n}return e[t]}}(),s=[];function a(e){for(var t=-1,n=0;n{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var i in t)n.o(t,i)&&!n.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.nc=void 0,n(452),n(328),n(74);n(47)})();